FROM    registry.cn-hangzhou.aliyuncs.com/hujiaming/alpine:3.6

### 下载地址 https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub

COPY    sgerrand.rsa.pub /etc/apk/keys


### 下载地址 https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk
COPY    glibc-2.29-r0.apk .

ADD     jdk-8u381-linux-x64.tar.gz /usr/local

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
    && apk update && apk upgrade \
    && apk --no-cache add tzdata \
    && cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime  \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk --no-cache add ca-certificates wget \
    && apk add glibc-2.29-r0.apk \
    && apk del tzdata \
    && rm -rf /var/cache/apk/* glibc-2.29-r0.apk


ENV     JAVA_HOME=/usr/local/jdk1.8.0_381
ENV     JRE_HOME=/usr/local/jdk1.8.0_381/jre
ENV     CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
ENV     PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

